Skip to content

fix(ci): harden GitHub Actions workflows (#8) - #9

Merged
paulinebm merged 1 commit into
dependabot/github_actions/actions-640176b5abfrom
security/workflow-hardening/pr-8
Sep 17, 2026
Merged

paulinebm merged 1 commit into
dependabot/github_actions/actions-640176b5abfrom
security/workflow-hardening/pr-8

Conversation

@hf-security-analysis

@hf-security-analysis hf-security-analysis Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Automated hardening of the workflow files flagged on #8.

Warning

This narrows what the workflow can reach. Job permissions were declared in .github/workflows/publish.yml, .github/workflows/test.yml. Each job now gets only the scopes its steps were read to need — if one of them does something this could not see, it will fail on the next run. The table below says which step drove each scope.

Targets dependabot/github_actions/actions-640176b5ab. Files changed:

  • .github/workflows/publish.yml
  • .github/workflows/test.yml

Fixed by this PR:

  • HIGH unpinned-action (pinact) — .github/workflows/test.yml:21
  • MEDIUM excessive-permissions (zizmor) — .github/workflows/publish.yml:14
  • MEDIUM excessive-permissions (zizmor) — .github/workflows/test.yml:1
  • MEDIUM excessive-permissions (zizmor) — .github/workflows/test.yml:12

This does not fix everything. 2 further finding(s) (2 medium) need a decision this bot should not make for you. They are in the security channel with their locations — deliberately not repeated here, since this repository may be public and they are not fixed yet.

Permissions

.github/workflows/publish.yml

job granted why
publish contents: read actions/checkout needs contents: read; the 'Publish on public registry' step logs into ghcr.io with the GH_USERNAME/GH_PASSWORD secrets rather than GITHUB_TOKEN, so no packages scope is required — if those secrets are ever swapped for GITHUB_TOKEN, packages: write would be needed.

test was left as it is — This job only delegates to the reusable workflow ./.github/workflows/test.yml, which is not contained in this file, so its steps and token usage cannot be inspected.

.github/workflows/test.yml

job granted why
test contents: read Only actions/checkout touches the token; the remaining steps install Helm from public URLs and run helm dependencies update / helm unittest locally, needing no GitHub API access.

Anything not listed above keeps the permissions it had. To measure a job this could not read, add GitHubSecurityLab/actions-permissions/monitor to it and run the workflow — it reports the minimum the run actually used.

Pinning changes come from pinact and are mechanical. Any other change was generated by Claude — read it before merging.

@paulinebm
paulinebm merged commit 050c468 into dependabot/github_actions/actions-640176b5ab Sep 17, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant